<script setup>
import { ref } from 'vue'

defineProps({ index: Number })

const tagValue = ref(1)
const tagMsg = ref([
  { id: 1, class: '流浪', type: 'danger' },
  { id: 2, class: '已喂养', type: 'success' },
  { id: 3, class: '已喂养', type: 'success' },
  { id: 4, class: '已喂养', type: 'success' }
])
</script>

<template>
  <el-tag :type="tagMsg[index - 1 || tagValue - 1].type" effect="dark">
    {{ tagMsg[index - 1 || tagValue - 1].class }}
  </el-tag>
</template>
